﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>申请记录</title>
    <link href="${pageContext.request.contextPath}/css/themes/default/easyui.css" rel="stylesheet" />
	<link href="${pageContext.request.contextPath}/css/themes/icon.css" rel="stylesheet"></link>
    <link href="${pageContext.request.contextPath}/css/themes/color.css" rel="stylesheet" />
    <script src="${pageContext.request.contextPath}/script/jquery.min.js"></script>
    <script src="${pageContext.request.contextPath}/script/jquery.easyui.min.js"></script>
    <script src="${pageContext.request.contextPath}/script/easyui-lang-zh_CN.js"></script>
    <style>
        body {
            font-size: 12px;
            overflow-y: hidden;
        }
         th {
         	font-size: 20px;
         } 
         td {
         	font-size: 18px;
         }  
         .datagrid-header .datagrid-cell span {
		    font-size: 15px;
    		font-weight: 800;
		}
		.datagrid-cell{
   			 font-size: 15px;
		}

    </style>
</head>
<body class="easyui-layout" >
	
	
	
<div data-options="region:'center'">
<div class="easyui-tabs" data-options="fit:true">
<div title="查询列表" style="padding:1px;">
	
	</br>
	<div>
   	 <td>单号:</td>
     <td>
     	<input type="text" class="easyui-textbox" name="dh" id="c"/>
     	<a type="button" onclick="cx()" style="cursor:pointer">查询</a>
     </td>
   </div>
   </br>
    
     <table class="easyui-datagrid" style="width:auto; height: 100%; padding:1px" rownumbers="true" fitcolumns="true" singleselect="true" id="table">
    	<thead>
    		<tr>
				<th data-options="field:'id'" width="4%" align="center">ID</th>
				<th data-options="field:'sqr'" width="6%" align="center">申请人</th>
				<th data-options="field:'sqrsj'" width="9%" align="center">申请人手机</th>
				<th data-options="field:'sjr'" width="6%" align="center">收件人</th>
				<th data-options="field:'sjrsj'" width="9%" align="center">收件人手机</th>
				<th data-options="field:'kdqy'" width="11%" align="center">快递区域</th>
				<th data-options="field:'yjdz'" width="18%" align="center">邮寄地址</th>
				<th data-options="field:'yszt'" width="12%" align="center">运送状态</th>
				<th data-options="field:'ydqy'" width="11%" align="center">已到区域</th>
				<th data-options="field:'dh'" width="6%" align="center">单号</th>
				<th data-options="field:'sp'" width="7%" align="center">审批</th>
			</tr>
			</thead>
    </table> 
</div>
</div>
</div>
	<script>
	
	function cx(){
		var c=$("#c").val();
    		$.ajax({
    			url:"${pageContext.request.contextPath}/express/queryexpress?dh="+c,
    			type:"GET",
    			dataType:"json",
    			success:function(data){
    			if(data.length<=0){
    				alert("此单号未审核或不存在！！！");
    			}else if(!c){
    				alert("单号未输入！！！");
    				window.location.reload();
    			}
    			//alert("ok");
    			for(var i = 0;i<data.length;i++){
  					var obj=data[i];
  					var id=obj.id;
  					var sqr=obj.sqr;
  					var sqrsj=obj.sqrsj;
  					var sjr=obj.sjr;
  					var sjrsj=obj.sjrsj;
  					var kdqy=obj.kdqy;
  					var yjdz=obj.yjdz;
  					var yszt=obj.yszt;
  					var ydqy=obj.ydqy;
  					var dh=obj.dh;
  					var sp=obj.sp;
  					$("#table").datagrid("appendRow",{
  						"id":id,
  						"sqr":sqr,
  						"sqrsj":sqrsj,
  						"sjr":sjr,
  						"sjrsj":sjrsj,
  						"kdqy":kdqy,
  						"yjdz":yjdz,
  						"yszt":yszt,
  						"ydqy":ydqy,
  						"dh":dh,
  						"sp":sp
  					});
    			}		
    			},
    			error:function(){
    				alert("未查到此单号！！！");
    			}
    		});
    	}
	</script>
</body>
</html>
